package com.woniu.dao;

import com.woniu.domain.CourseSection;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ljy
 */
public interface CourseSectionDao {

    //根据课程id查询章节
    @ApiOperation(value = "根据课程id查询章节")
    @ApiImplicitParam(name = "courseId",value = "课程id")
    List<CourseSection> getByCourseId(@Param("courseId") Integer courseId);

    //根据课程id查询章节
    @ApiOperation(value = "根据课程id查询章节")
    @ApiImplicitParam(name = "courseId",value = "课程id")
    List<CourseSection> getCourseSectionByCid(@Param("courseId") Integer courseId);

    @ApiOperation(value = "添加章节")
    @ApiImplicitParam(name = "courseSection",value = "章节id")
    int addCourseSection(List<CourseSection> courseSections);

    @ApiOperation(value = "根据章节名集合查询章节")
    @ApiImplicitParam(name = "chapters",value = "章节名集合")
    List<CourseSection> getCourseSectionByChapter(List<String> chapters);

}
